<template>
    <div class="breadcrumbs-warp">
        <div class="container">
            <div class="row">
                <notice v-if="showNotice"></notice>
                <ol v-if="isShow" class="breadcrumb hidden-xs">
                    <li v-for="(item,index) in breadcrumb" :key="item.title" :class="{'active':index==(breadcrumb.length-1)}">
                        <router-link v-if="index<(breadcrumb.length-1)" :to="item.url" v-text="item.title"></router-link>
                        <span v-text="item.title" v-else></span>
                    </li>
                </ol>
                <slot v-if="!isShow"></slot>
            </div>
        </div>
    </div>
</template>
<script>
import notice from './Notice'
export default {
    props: {
        showNotice: {
            type: Boolean,
            default: true
        },
        breadcrumb: Array,
        isShow: {
            type: Boolean,
            default: true
        }
    },
    components: {
        notice
    }
}
</script>
<style scoped>
.breadcrumbs-warp {
    width: 100%;
    padding: 15px 0;
    font-family: "Open Sans", sans-serif;
    font-size: 12px;
    font-weight: 300;
    background-color: #f7f7f7;
    border-bottom: 1px solid #dbdbdb;
}

.breadcrumbs-warp .row {
    position: relative;
}

.cart-subtitle {
    font-size: 16px;
    color: #222;
    font-weight: 600;
}

.cart-subtitle img {
    margin-right: 5px
}

@media (max-width: 767px) {
    .breadcrumbs-warp .container {
        padding: 0;
        width: 100%;
    }
    .breadcrumbs-warp .row {
        margin: 0;
    }
    .breadcrumbs-warp .cart-subtitle {
        border-top: 1px #DBDBDB solid;
        padding: 15px 0 0px;
        margin-top: 15px;
        text-align: center;
    }
    .breadcrumbs-warp .cart-subtitle img {
        display: none;
    }
}

@media (min-width: 992px) {
    .breadcrumbs-warp {
        padding: 20px 0;
    }
}
</style>
